package org.example.designPattern.structural.flyweight;

import java.util.HashMap;
import java.util.Map;

public class CheckAddress {
    private Map<Integer, String> checkAddressMap = new HashMap<>();

    public CheckAddress() {
        for (int i = 0; i < 100; i++) {
            checkAddressMap.put(i, "北京市第" + i + "人民医院");
        }
    }

    String getCheckAddress(Integer checkAddressId){
        return checkAddressMap.get(checkAddressId);
    }
}
